package com.xiaobug.demo.glide;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.ljb.commlibrary.http.ImageUtils;
import com.xiaobug.baselibrary.base.BaseActivity;
import com.xiaobug.demo.R;
import com.xiaobug.demo.databinding.GlideActivityTestBinding;


/**
 * Created by ljb on 2018/.
 */

public class GlideTestActivity extends BaseActivity<GlideActivityTestBinding> {
    public static void actionStart(Context context) {
        context.startActivity(new Intent(context, GlideTestActivity.class));
    }

    public class Presenter {
        public void onClick(View view) {
//            String url = "http://jk-cloud-app.oss-cn-hangzhou.aliyuncs.com/z_test/ooYBAFO6RIWIQsN1ACrDyPxJF70AABtmgBnW3EAKsPg092.jpg";
//            String url = "http://jk-cloud-app.oss-cn-hangzhou.aliyuncs.com/z_test/9f510fb30f2442a78e535935d143ad4bd01302c4.gif";
            String url = "http://jk-cloud-app.oss-cn-hangzhou.aliyuncs.com/z_test/中文测试/中国で起きた重大.jpg";
//            String url = "http://jk-cloud-app.oss-cn-hangzhou.aliyuncs.com/z_test/%u4E2D%u6587%u8DEF%u5F84%u6D4B%u8BD5.jpg";

            //http://jk-cloud-app.oss-cn-hangzhou.aliyuncs.com/z_test/%E4%B8%AD%E6%96%87%E6%B5%8B%E8%AF%95/%E4%B8%AD%E6%96%87%E8%B7%AF%E5%BE%84%E6%B5%8B%E8%AF%95.jpg

            ImageUtils.load(GlideTestActivity.this, url, R.mipmap.ic_launcher, mBinding.iv);


        }
    }

    @Override
    protected int getRootID() {
        return R.layout.glide_activity_test;
    }

    @Override
    protected void initData(Bundle savedInstanceState, GlideActivityTestBinding binding) {
        binding.setP(new Presenter());
    }

}
